﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:props="clr-namespace:ScrumFactory.Windows.Properties"
                    xmlns:SF_Helpers="clr-namespace:ScrumFactory.Windows.Helpers;assembly=ScrumFactory.Windows.Helpers"
                    xmlns:sys="clr-namespace:System;assembly=mscorlib">


  

    <Style x:Key="MouseOverBorder" TargetType="{x:Type Border}">
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="CornerRadius" Value="4"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Style.Triggers>
            <Trigger Property="Border.IsMouseOver" Value="True">
                <Setter Property="Border.Background" Value="{StaticResource MouseOverBackgroundBrush}"/>
                <Setter Property="Border.BorderBrush" Value="{StaticResource MouseOverBorderBrush}"/>
                <Setter Property="TextBlock.Foreground" Value="{StaticResource MouseOverForegroundBrush}"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="MemberImageControlStyle" TargetType="{x:Type ContentControl}">
        <Setter Property="Width" Value="50"/>
        <Setter Property="Height" Value="50"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border                            
                        Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" 
                        CornerRadius="8" BorderThickness="1">
                        <Border.BorderBrush>
                            <SolidColorBrush Color="{StaticResource Blue1Color}"/>
                        </Border.BorderBrush>
                        <Border.Background>
                            <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="{StaticResource Blue0Color}" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.Background>
                        <Border.Effect>
                            <DropShadowEffect ShadowDepth="2" Opacity="0.5" />
                        </Border.Effect>
                        <Border
                    Margin="4"
                    Width="38" Height="38" BorderBrush="Gray" BorderThickness="1" Background="Gray">

                        </Border>
                    </Border>
                </ControlTemplate>           
            </Setter.Value>
        </Setter>
    </Style>
    

    <Style x:Key="LoadingAnimationContent" TargetType="{x:Type ContentControl}">
        <Setter Property="Visibility" Value="Collapsed"/>
        <Setter Property="Template">            
            <Setter.Value>
                <ControlTemplate>
                    <StackPanel>
                        <StackPanel.Background>
                            <SolidColorBrush Color="LightGray" Opacity="0.1" PresentationOptions:Freeze="True"  />
                        </StackPanel.Background>
                        <Image
                            Source="/Images/LogoLoading.png"                
                            Stretch="None"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Margin="5,5,5,0">
                            <Image.RenderTransform>
                                <ScaleTransform ScaleX="1" ScaleY="1" CenterX="0.5" CenterY="0.5"/>
                            </Image.RenderTransform>
                            <Image.Triggers>
                                <EventTrigger RoutedEvent="Image.Loaded">
                                    <EventTrigger.Actions>
                                        <BeginStoryboard>
                                            <Storyboard AutoReverse="True" RepeatBehavior="Forever" >
                                                <DoubleAnimation                                                                        
                                                Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleX)"                                               
                                                To="0.8"
                                                Duration="00:00:0.5"
                                                PresentationOptions:Freeze="True"/>
                                                <DoubleAnimation Storyboard.TargetProperty="(Image.RenderTransform).(ScaleTransform.ScaleY)"
                                                To="0.8"
                                                Duration="00:00:0.5"
                                                PresentationOptions:Freeze="True"/>
                                            </Storyboard>
                                        </BeginStoryboard>
                                    </EventTrigger.Actions>
                                </EventTrigger>
                            </Image.Triggers>
                        </Image>
                        <TextBlock Text="{x:Static props:Resources.Loading}" FontSize="{StaticResource SmallFontSize}" Foreground="LightGray" HorizontalAlignment="Center"/>
                    </StackPanel>
                </ControlTemplate>
            
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsLoadingData}" Value="True">
                <Setter Property="Visibility" Value="Visible"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>
   




    <Style x:Key="ContentPanelBorder" TargetType="{x:Type Border}">
        <Setter Property="Background" Value="{StaticResource PanelBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1" PresentationOptions:Freeze="True">
                    <GradientStop Color="Gray" Offset="0"/>
                    <GradientStop Color="White" Offset="1"  />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="CornerRadius" Value="5,5,0,0"/>
    </Style>

   
   
    

    <Style TargetType="{x:Type SF_Helpers:DockWindowContainer}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type SF_Helpers:DockWindowContainer}">
                    <ScrollViewer
                            HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                            x:Name="windowScrollViewer_PART"                                                       
                            VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled">
                        <Grid x:Name="contentGrid_PART">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <ContentPresenter
                                        Grid.Column="0"
                                        Content="{TemplateBinding Content}"/>
                            <SF_Helpers:ScrollViewerOffsetMediator
                                    x:Name="Mediator_PART"            
                                    ScrollViewer="{Binding ElementName=windowScrollViewer_PART}"/>
                        </Grid>
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style x:Key="AlertBorder" TargetType="{x:Type Border}">
        <Setter Property="Background" Value="{StaticResource AlertBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource AlertBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="CornerRadius" Value="5"/>
        <Setter Property="Padding" Value="8"/>
    </Style>



</ResourceDictionary>
    
    
    